using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._3DFeatures._Interpolation
{
    /// <summary>
    /// <para>Update Feature Z</para>
    /// <para>Updates the z-coordinates of 3D feature vertices using a surface.</para>
    /// <para>使用曲面更新 3D 要素折点的 z 坐标。</para>
    /// </summary>    
    [DisplayName("Update Feature Z")]
    public class UpdateFeatureZ : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdateFeatureZ()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The 3D features whose vertex z-values will be modified.</para>
        /// <para>将修改其顶点 z 值的 3D 要素。</para>
        /// </param>
        /// <param name="_in_surface">
        /// <para>Input Surface</para>
        /// <para>The surface that will be used to determine the new z-value for the 3D feature vertices.</para>
        /// <para>将用于确定 3D 要素折点的新 z 值的曲面。</para>
        /// </param>
        public UpdateFeatureZ(object _in_features, object _in_surface)
        {
            this._in_features = _in_features;
            this._in_surface = _in_surface;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Update Feature Z";

        public override string CallName => "3d.UpdateFeatureZ";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _in_surface, _method.GetGPValue(), _status_field, _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The 3D features whose vertex z-values will be modified.</para>
        /// <para>将修改其顶点 z 值的 3D 要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Input Surface</para>
        /// <para>The surface that will be used to determine the new z-value for the 3D feature vertices.</para>
        /// <para>将用于确定 3D 要素折点的新 z 值的曲面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface { get; set; }


        /// <summary>
        /// <para>Interpolation Method</para>
        /// <para><xdoc>
        ///   <para>Interpolation method used in determining information about the surface. The available options depend on the data type of the input surface:</para>
        ///   <bulletList>
        ///     <bullet_item>Bilinear—An interpolation method exclusive to the raster surface, which determines cell values from the four nearest cells. This is the only option available for a raster surface.</bullet_item><para/>
        ///     <bullet_item>Linear— Default interpolation method for a TIN, terrain, and LAS dataset. Obtains elevation from the plane defined by the triangle that contains the XY location of a query point.</bullet_item><para/>
        ///     <bullet_item>Natural Neighbors— Obtains elevation by applying area-based weights to the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Minimum Z— Obtains elevation from the smallest z-value found among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Maximum Z— Obtains elevation from the largest z-value found among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Nearest Z— Obtains elevation from the nearest value among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Z Closest To Mean— Obtains elevation from the z-value that is closest to the average of all the natural neighbors of a query point.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于确定有关曲面的信息的插值方法。可用选项取决于输入图面的数据类型：</para>
        ///   <bulletList>
        ///     <bullet_item>双线性 - 栅格表面专用的插值方法，用于确定四个最近像元的像元值。这是栅格表面唯一可用的选项。</bullet_item><para/>
        ///     <bullet_item>线性- TIN、terrain 和 LAS 数据集的默认插值方法。从包含查询点的 XY 位置的三角形定义的平面获取高程。</bullet_item><para/>
        ///     <bullet_item>自然邻居 - 通过将基于区域的权重应用于查询点的自然邻居来获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆最小 Z- 从查询点的自然邻居中找到的最小 z 值获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆最大 Z - 从查询点的自然邻居中找到的最大 z 值获取高程。</bullet_item><para/>
        ///     <bullet_item>Conflate Nearest Z - 从查询点的自然邻居中的最近值获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆 Z 最接近均值 - 从最接近查询点所有自然邻居的平均值的 z 值获取高程。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolation Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._LINEAR;

        public enum _method_value
        {
            /// <summary>
            /// <para>Linear</para>
            /// <para>Linear— Default interpolation method for a TIN, terrain, and LAS dataset. Obtains elevation from the plane defined by the triangle that contains the XY location of a query point.</para>
            /// <para>线性- TIN、terrain 和 LAS 数据集的默认插值方法。从包含查询点的 XY 位置的三角形定义的平面获取高程。</para>
            /// </summary>
            [Description("Linear")]
            [GPEnumValue("LINEAR")]
            _LINEAR,

            /// <summary>
            /// <para>Natural Neighbors</para>
            /// <para>Natural Neighbors— Obtains elevation by applying area-based weights to the natural neighbors of a query point.</para>
            /// <para>自然邻居 - 通过将基于区域的权重应用于查询点的自然邻居来获取高程。</para>
            /// </summary>
            [Description("Natural Neighbors")]
            [GPEnumValue("NATURAL_NEIGHBORS")]
            _NATURAL_NEIGHBORS,

            /// <summary>
            /// <para>Conflate Minimum Z</para>
            /// <para>Conflate Minimum Z— Obtains elevation from the smallest z-value found among the natural neighbors of a query point.</para>
            /// <para>混淆最小 Z- 从查询点的自然邻居中找到的最小 z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Minimum Z")]
            [GPEnumValue("CONFLATE_ZMIN")]
            _CONFLATE_ZMIN,

            /// <summary>
            /// <para>Conflate Maximum Z</para>
            /// <para>Conflate Maximum Z— Obtains elevation from the largest z-value found among the natural neighbors of a query point.</para>
            /// <para>混淆最大 Z - 从查询点的自然邻居中找到的最大 z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Maximum Z")]
            [GPEnumValue("CONFLATE_ZMAX")]
            _CONFLATE_ZMAX,

            /// <summary>
            /// <para>Conflate Nearest Z</para>
            /// <para>Conflate Nearest Z— Obtains elevation from the nearest value among the natural neighbors of a query point.</para>
            /// <para>Conflate Nearest Z - 从查询点的自然邻居中的最近值获取高程。</para>
            /// </summary>
            [Description("Conflate Nearest Z")]
            [GPEnumValue("CONFLATE_NEAREST")]
            _CONFLATE_NEAREST,

            /// <summary>
            /// <para>Conflate Z Closest To Mean</para>
            /// <para>Conflate Z Closest To Mean— Obtains elevation from the z-value that is closest to the average of all the natural neighbors of a query point.</para>
            /// <para>混淆 Z 最接近均值 - 从最接近查询点所有自然邻居的平均值的 z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Z Closest To Mean")]
            [GPEnumValue("CONFLATE_CLOSEST_TO_MEAN")]
            _CONFLATE_CLOSEST_TO_MEAN,

            /// <summary>
            /// <para>Bilinear</para>
            /// <para>Bilinear—An interpolation method exclusive to the raster surface, which determines cell values from the four nearest cells. This is the only option available for a raster surface.</para>
            /// <para>双线性 - 栅格表面专用的插值方法，用于确定四个最近像元的像元值。这是栅格表面唯一可用的选项。</para>
            /// </summary>
            [Description("Bilinear")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

        }

        /// <summary>
        /// <para>Status Field</para>
        /// <para>An existing numeric field that will be populated with values to reflect whether the feature's vertices were successfully updated. A value of 1 would be specified for updated features and 0 for features that were not updated. Features that partially overlap the surface will not be updated.</para>
        /// <para>将使用值填充的现有数值字段，以反映要素的折点是否已成功更新。对于更新的功能，将指定值 1，对于未更新的功能，将指定值 0。不会更新与曲面部分重叠的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Status Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _status_field { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public UpdateFeatureZ SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}